<?php
/* define all directories that have php files you will include elswhere and define below, then just require this file in every page */
$lastSlash = strripos (dirname(__FILE__) , '/');
$root_dir = substr(dirname(__FILE__), 0, $lastSlash);
define('APP_ROOT', $root_dir);
define('DIR_INCLUDES', APP_ROOT.DIRECTORY_SEPARATOR.'includes');
define('DIR_MENUS', APP_ROOT.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'menus');
define('DIR_CALENDAR', APP_ROOT.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'fullcalendar');
define('DIR_CONFIG', APP_ROOT.DIRECTORY_SEPARATOR.'config');
define('DIR_ADMIN', APP_ROOT.DIRECTORY_SEPARATOR.'admin');
define('DIR_TCPDF', APP_ROOT.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'tcpdf');
define('DIR_IMAGES', APP_ROOT.DIRECTORY_SEPARATOR.'images');
set_include_path(DIR_INCLUDES.PATH_SEPARATOR.DIR_MENUS.PATH_SEPARATOR.DIR_CALENDAR.PATH_SEPARATOR.DIR_CONFIG.PATH_SEPARATOR.DIR_ADMIN.PATH_SEPARATOR.DIR_TCPDF.PATH_SEPARATOR.DIR_IMAGES.PATH_SEPARATOR.get_include_path());
?>